package com.jsmile.cloud.tradecenter.api.feign;

import java.util.List;

import javax.validation.Valid;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.jsmile.cloud.tradecenter.api.constants.TradeConstants;
import com.jsmile.cloud.tradecenter.api.req.express.ReqExpressQuery;
import com.jsmile.cloud.tradecenter.api.res.express.ResExpressCompany;
import com.jsmile.mall.api.JSmileResult;

@FeignClient(value = TradeConstants.APPLICATION_NAME, contextId = "express")
public interface ExpressServiceApi {

    @RequestMapping(value = "/feign/express/query", method = RequestMethod.POST)
    JSmileResult query(ReqExpressQuery reqExpressQuery);

    @RequestMapping(value = "/feign/express/findAll", method = RequestMethod.POST)
    JSmileResult<List<ResExpressCompany>> findAll(@RequestBody @Valid ReqExpressQuery reqExpressQuery);

}
